export default {
    '/': [
        {
            text: "帮助文档",
            items: [
                {text: "项目介绍", link: "/zh/guide/"},
                {text: "项目结构", link: "/zh/guide/directory"},
            ],
        },
        {
            text: "快速使用",
            collapsed: false,
            items: sidebarExt(),
        },
        {
            text: "进阶功能",
            collapsed: false,
            items: sidebarFunction(),
        }
    ],
    '/zh/business/': sidebarBusiness(),
    '/zh/faq/': sidebarFaq(),
    '/zh/market/': sidebarMarket(),
}

function sidebarBusiness() {
    return [
        {
            text: '🔥 商业版',
            items: [
                {
                    text: '审批(BPM)',
                    link: '/zh/business/bpm',
                    items: [
                        {text: '监听器说明', link: '/zh/business/listener'},
                    ]
                },
                {text: '运输(TMS)', link: '/zh/business/tms',},
                {text: '仓储(WMS)', link: '/zh/business/wms'},
            ]
        }
    ]
}

function sidebarMarket() {
    return [
        {
            text: '生态服务',
            collapsed: false,
            items: [
                // {text: '学习视频', link: '/zh/market/video'},
                {text: '贡献列表', link: '/zh/market/contributors'},
                {text: '授权列表', link: '/zh/market/authorized'},
            ]
        }
    ]
}

function sidebarFaq() {
    return [
        {
            text: '🆘 常见问题', link: '/zh/faq/',
            collapsed: false,
            items: [
                {text: '数据库', link: '/zh/faq/db'},
                {text: '多租户', link: '/zh/faq/tenant'},
            ],
        },
    ]
}

function sidebarExt() {
    return [
        {text: '环境安装', link: '/zh/guide/env/install'},
        {text: '环境部署', link: '/zh/guide/env/deploy'},
        {
            text: '快速开发', link: '/zh/guide/dev/',
            collapsed: false,
            items: [
                {text: '系统日志', link: '/zh/guide/dev/log'},
                {text: '简单案例', link: '/zh/guide/dev/demo'},
                {text: '事务管理', link: '/zh/guide/dev/transactional'},
            ]
        },
        {
            text: '组件介绍',
            collapsed: true,
            items: [
                {text: '容器引擎', link: '/zh/guide/env/middleware/docker'},
                {text: '服务发现', link: '/zh/guide/env/middleware/discovery'},
                {text: '缓存存储', link: '/zh/guide/env/middleware/redis'},
                {text: '数据存储', link: '/zh/guide/env/middleware/db'},
                {text: '消息总线', link: '/zh/guide/env/middleware/bus'},
                {text: '链路追踪', link: '/zh/guide/env/middleware/skywalking'},
            ]
        },
    ]
}

function sidebarFunction() {
    return [
        {text: 'Excel操作', link: '/zh/guide/packages/excel'},
        {text: '租户配置', link: '/zh/guide/packages/tenant'},
        {text: '数据权限', link: '/zh/guide/packages/data_permission'},
        {text: '服务调用', link: '/zh/guide/packages/feign'},
        {text: '远程映射', link: '/zh/guide/packages/remote'},
        {text: '消息机器人', link: '/zh/guide/packages/robot'},
        {
            text: '服务网关',
            link: '/zh/guide/packages/gateway/',
            collapsed: true,
            items: [
                {
                    text: '限流规则',
                    link: '/zh/guide/packages/gateway/limit'
                },
                {
                    text: '限访名单',
                    link: '/zh/guide/packages/gateway/blacklist'
                },
            ]
        },
        {
            text: '授权管理',
            collapsed: true,
            link: '/zh/guide/packages/security/index',
            items: [
                {
                    text: 'Token 管理',
                    link: '/zh/guide/packages/security/token'
                },
                {
                    text: 'Login 管理',
                    link: '/zh/guide/packages/security/login'
                }
            ]
        },
        {
            text: '文件存储',
            link: '/zh/guide/packages/oss'
        },
        {
            text: '代码生成',
            link: '/zh/guide/packages/generate'
        },
        {
            text: '运维管理',
            collapsed: true,
            link: '/zh/guide/packages/devops/index',
            items: [
                {
                    text: 'Nginx',
                    link: '/zh/guide/packages/devops/nginx'
                },
                {
                    text: 'Docker Compose',
                    link: '/zh/guide/packages/devops/docker-compose'
                },
                {
                    text: 'Sentinel',
                    link: '/zh/guide/packages/devops/sentinel'
                },
                {
                    text: '监控中心',
                    link: '/zh/guide/packages/devops/monitor'
                },
            ]
        }
    ]
}
